<?php

/**
 * This file is part of the Pagizer package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright   Copyright (c) 2010 Advisa (http://www.advisa.fr)
 * @author      Pagizer Core Team <team@pagizer.org>
 * @package     Pagizer
 * @subpackage  backoffice
 */

/**
 * Ajax action for context menu
 */
class m_backoffice_actions_AjaxContextAction extends m_backoffice_extends_Action
{
	public function execute()
	{
		f_core_Routing::getInstance()->setRequestURL($this->getRequestParameter("href"));
		if($this->getRequestParameter("action") != 'AjaxContext')
        {
            $this->launchAction($this->getRequestParameter("module"), "block_".$this->getRequestParameter("action"));
        }
        else
        {
            return f_template_Template::getInstance()->setModuleTemplate('backoffice', 'block/modal/ModalNoAction.html')->render();
        }
	}	
}